package com.example.world.dao;


import java.sql.SQLException;
import java.util.List;

import org.junit.Test;

import com.example.world.domain.City;


import junit.framework.TestCase;

public class TestCityDAO {

	@Test
	public void test1() throws SQLException
	{
		
		CityDAO dao = new CityDAO();
		
		City c = dao.findByCode("Kabul","AFG","kabol");
		System.out.println(c);
		
		TestCase.assertNotNull(c);
	}
	
	@Test
	public void test2() throws SQLException
	{
		
		CityDAO dao = new CityDAO();
		
		List<City> list = dao.findAll();
		for(City c:list)
		{
			System.out.println(c);
		}
		
		TestCase.assertNotNull(list);
	}
}